package com.size.mall.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.size.mall.mallapi.entity.Member;
import com.size.mall.mallapi.entity.UmsMemberReceiveAddress;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 会员表 Mapper 接口
 * </p>
 *
 * @author Helen
 * @since 2019-10-18
 */
@Repository
public interface MemberMapper extends BaseMapper<Member> {

    @Select("Select * from ums_member_receive_address where member_id  = #{member_id}")
    List<UmsMemberReceiveAddress> getMemberReceiveAddressByMemberId(@Param("member_id") String memberId);

    @Select("Select * from ums_member_receive_address where id  = #{receiveAddressId}")
    UmsMemberReceiveAddress getAddrByReciveAddressId(@Param("receiveAddressId")String receiveAddressId);
}
